package com.ruoyi.qt.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qt.mapper.QtMistakeMapper;
import com.ruoyi.qt.domain.QtMistake;
import com.ruoyi.qt.service.IQtMistakeService;

/**
 * 错题Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-06
 */
@Service
public class QtMistakeServiceImpl implements IQtMistakeService 
{
    @Autowired
    private QtMistakeMapper qtMistakeMapper;

    /**
     * 查询错题
     * 
     * @param mistakeId 错题主键
     * @return 错题
     */
    @Override
    public QtMistake selectQtMistakeByMistakeId(String mistakeId)
    {
        return qtMistakeMapper.selectQtMistakeByMistakeId(mistakeId);
    }

    /**
     * 查询错题列表
     * 
     * @param qtMistake 错题
     * @return 错题
     */
    @Override
    public List<QtMistake> selectQtMistakeList(QtMistake qtMistake)
    {
        return qtMistakeMapper.selectQtMistakeList(qtMistake);
    }

    /**
     * 新增错题
     * 
     * @param qtMistake 错题
     * @return 结果
     */
    @Override
    public int insertQtMistake(QtMistake qtMistake)
    {
        return qtMistakeMapper.insertQtMistake(qtMistake);
    }

    /**
     * 修改错题
     * 
     * @param qtMistake 错题
     * @return 结果
     */
    @Override
    public int updateQtMistake(QtMistake qtMistake)
    {
        return qtMistakeMapper.updateQtMistake(qtMistake);
    }

    /**
     * 批量删除错题
     * 
     * @param mistakeIds 需要删除的错题主键
     * @return 结果
     */
    @Override
    public int deleteQtMistakeByMistakeIds(String[] mistakeIds)
    {
        return qtMistakeMapper.deleteQtMistakeByMistakeIds(mistakeIds);
    }

    /**
     * 删除错题信息
     * 
     * @param mistakeId 错题主键
     * @return 结果
     */
    @Override
    public int deleteQtMistakeByMistakeId(String mistakeId)
    {
        return qtMistakeMapper.deleteQtMistakeByMistakeId(mistakeId);
    }
}
